package com.augurit.common.sysmeta.service;

import java.util.List;

import org.springside.modules.orm.Page;

import com.augurit.common.base.extmodel.base.BaseTreeNode;
import com.augurit.common.base.extmodel.inner.ExtMetaOwnerNode;
import com.augurit.common.base.service.IBaseService;
import com.augurit.common.sysmeta.web.form.SysMetaTableForm;

public interface ISysMetaTableService extends IBaseService<SysMetaTableForm, Long>{

	/**
	 * 关联删除,删除SysMetaTableForm以及它所关联的SysMetaColumnForm列表
	 * @param id
	 */
	public void deleteCasecade(Long id);
	
	
	/**
	 * 异步获取整个树信息
	 * @param id 
	 * @return
	 */
	public List<? extends BaseTreeNode> viewTree(String id);
	
	/**
	 * 条件查询方法
	 * @param form
	 * @return
	 */
	public Page<SysMetaTableForm> search(SysMetaTableForm form,Page<SysMetaTableForm> page);
	
	/**
	 * 获取所有的元数据树用户Ext节点
	 * @return
	 */
	public List<ExtMetaOwnerNode> getAllOwner();
	
	/**
	 * 根据用户获取表结构定义form对象列表
	 * @param owner
	 * @return
	 */
	public List<SysMetaTableForm> getAllMetaTables();
	

	/**
	 * 条件查询方法,并过滤掉指定实体名的表
	 * @param form
	 * @return
	 */
	public Page<SysMetaTableForm> search(SysMetaTableForm form,Page<SysMetaTableForm> page,String busEntityName);
	
	public Long[] getTableIdsByEntityNames(String entityNames[]);
	
	public List<SysMetaTableForm> getTableByEntityNames(String entityNames[]);
	
	public List<SysMetaTableForm> getTableByTableNames(String tableNames[]);
	
	public List<SysMetaTableForm> getOtherTables(SysMetaTableForm form, String entityName);
}
